package scoutobahn.util;
/**
 * Simple Stopwatch for performance analysis.
 * @author mark
 *
 */
public class Stopwatch {
    private long startTime;
    private long endTime;
    /**
     * Starts the Stopwatch.
     * @return The time the Stopwatch was started
     */
    public long start() {
        this.startTime = System.currentTimeMillis();
        return this.startTime;
    }
    /**
     * Stops the Stopwatch.
     * @return The time the Stopwatch was stopped
     */
    public long end() {
        this.endTime = System.currentTimeMillis();
        return this.endTime;
    }
    /**
     * Returns the number of elapsed milliseconds.
     * @return The elapsed milliseconds
     */
    public long getElapsedMilliseconds() {
        return this.endTime - this.startTime;
    }
}
